Skip to main content

All Questions

Tagged with
2votes
1answer
149views

Extracting authors and books from XML and inserting them into PostgreSQL

There is a tree of start folder, it's subfolders, their subfolders, etc. In each folder, subfolder, etc. there are the same structured XML files stored. books.xml ...
erohtpur's user avatar
5votes
1answer
81views

Refactoring a class that counts xml dom nodes and caches the result

I saw this entertaining talk by: Bob Martin on clean code and started refactoring a relatively simple class today. I am, by no means, an expert on coding and still learning a lot every day, so I want ...
Stormnorm's user avatar
4votes
1answer
128views

Enables markup to instantiate objects, call methods, and generate HTML

I created this package PXP. PXP enables markup to instantiate objects, call methods, and generate HTML. It works similar to a server-side templating engine, but rather than enforcing braces it ...
hxtree's user avatar
2votes
1answer
114views

Creating objects from xml-data

I've got an XML file with some info about hosts connected to my home network and I would like to create objects containing that info in a neat way, so that I can make some nice front-end application ...
wenzzzel's user avatar
2votes
1answer
98views

PHP RSS/XML reader basic class

I write this class to process and output xml/rss feeds. I'm still working on, but any suggestion will be appreciated. As a little trick if the xml file come from an online resource, I've added a ...
user9741470's user avatar
4votes
1answer
571views

Displaying text extracted from XML using PHP simplexml

I have this xml file and i am parsing it with php simplexml. My XML file looks like this: ...
eskimopest's user avatar
2votes
1answer
231views

Array Duplicate Item Filtering by Element Value

I'm learning to code PHP and gave myself a challenge: Filter array data by matching a specific element value for duplication. I went through it logically on paper then wrote code and it worked on the ...
iswitch's user avatar
2votes
1answer
98views

Cloning Distinct XML structures without data in PHP

I struggled for the last couple days on this question and finally came up with a solution. But it's got so many loops I get dizzy just looking at the code - from recursive functions with loops to ...
Jeff Puckett's user avatar
3votes
3answers
334views

XML parser using PHP

It is just one of the files. I have also tried to write some tests using PHPUnit. Please give me some suggestions to improve my coding-writing skills. The below is the test file for the above file: <...
Karthikeyan Palaniswamy's user avatar
3votes
1answer
812views

Checking if a student ID is present in the database

What I need to do is fetch the XML link using curl then get a student ID and check if the ID is present in the database. If yes, then I need to get other details from another database table. My code ...
Arjun's user avatar
1vote
2answers
160views

Checking multiple XML in PHP

I am working on a code to see if a video already exists. The problem is that I have to check multiple sections. The code is working but it should not be this big, I think, and it takes a long time to ...
MrKramer's user avatar
3votes
1answer
364views

Reading and Converting XML File to Array

I'm using WordPress ( PHP Based Platform ) and I'm trying to read an external XML File, convert it into a usable array, then compare two arrays - one from the xml file and another from an options ...
Howdy_McGee's user avatar
0votes
1answer
190views

Parse and Query XML code optimisation

I have stored in a XML file some Travel packages, each package has a code( the codes are stored in an array = $code). I am using the below code to pull the ...
user avatar
1vote
1answer
166views

PHP DOM XML Creation

I am currently working on Shopify webhooks which posts XML to the Colorado timber line API. But due to the order protocol of the Colorado timber line API, it is required to modify the XML posted by ...
Amit Singh's user avatar
2votes
0answers
326views

Drop-down list with 14 options of RSS feed dates

The goal of this code is to create drop-down menu where there are 14 options on the list. Those 14 options are the dates that an RSS feed were last updated. The URLs for the feed have the query ...
Laura M's user avatar

153050per page
close